﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameStateManagement;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Heightmap_Editor.Menu.Screens
{
    class MenuSpinner : MenuEntry
    {
        private int _selection = 0;
        private string _basistext = "";

        public int Selection
        {
            get { return _selection; }
            set { _selection = value; }
        }

        public MenuSpinner(string text, int selection)
            : base(text + selection)
        {
            _basistext = text;
            Selection = selection;
        }

        public void Increase()
        {
            _selection++;
            Text = _basistext + _selection;
        }

        public void Decrease()
        {
            if (_selection > 1)
                _selection--;

            Text = _basistext + _selection;
        }
    }
}
